import request from "@/utils/request";

// 查询人员管控列表
export function getinstitutionlist(query, data) {
  return request({
    url: "/system/personnel/list",
    method: "post",
    params: query,
    data,
  });
}

// 人员管控列表详情
export function getPepleInfoApi(screeningPersonnelId) {
  return request({
    url: `/system/personnel/getInfo`,
    method: "get",
    params:{screeningPersonnelId}
  });
}

// 人员管控列表详情
export function getPepleDictApi(dictType) {
  return request({
    url: `/system/dict/type/selectDictDataListByType`,
    method: "get",
    params:{dictType}
  });
}

// 编辑人员管控列表
export function editPeopleApi(data) {
  return request({
    url: "/system/personnel/edit",
    method: "post",
    data,
  });
}

// 添加人员管控信息
export function addControlApi(data) {
  return request({
    url: "/system/personnel/control",
    method: "post",
    data,
  });
}

// 获取辖区派出所
export function getPoliceListApi() {
  return request({
    url: `/system/dept/listAll`,
    method: "get",
  });
}

// 获取辖区派出所2
export function getPoliceSonListApi() {
  return request({
    url: `/system/dept/selectDeptListByLevel`,
    method: "get",
  });
}

// 获取辖区派出所2
export function getLookApi() {
  return request({
    url: `/system/personnel/selectPersonneCountList`,
    method: "get",
  });
}

// 添加重点单位列表
export function addinstitution(data) {
  return request({
    url: "/system/institution/add",
    method: "post",
    data,
  });
}

// 编辑重点单位列表
export function editinstitution(data) {
  return request({
    url: "/system/institution/edit",
    method: "post",
    data,
  });
}

// 重点单位列表详情
export function getinstitutiondetail(institutionId) {
  return request({
    url: `/system/personnel/getInfo/${institutionId}`,
    method: "get",
  });
}

// 删除重点单位列表
export function delinstitution(institutionId) {
  return request({
    url: `/system/institution/remove/${institutionId}`,
    method: "get",
  });
}

// 检查单位
export function selectDeptListByUser(data) {
  return request({
    url: `/system/dept/selectDeptListByUser`,
    method: "post",
    data,
  });
}

// 安全指数
export function checkInRecordCount(data) {
  return request({
    url: `/system/statistics/getInstitutionCheckCount`,
    method: "post",
    data,
  });
}
